Fix a test on nightly Rust
authorAlex Crichton <alex@alexcrichton.com>
Fri, 29 Jan 2016 18:20:54 +0000 (10:20 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 29 Jan 2016 18:20:54 +0000 (10:20 -0800)
Relax an output assertion to just contains instead of exhaustively matching

tests/test_cargo_bench.rs

index 32382b216f5209e810fa5ce2c800713f3bcc242e..fe815d657485be3b793baad363799553eb90708e 100644 (file)
@@ -181,14 +181,14 @@ test!(cargo_bench_failing_test {
                 execs().with_stdout("hello\n"));
 
     assert_that(p.cargo("bench"),
-                execs().with_stdout(&format!("\
+                execs().with_stdout_contains(&format!("\
 {} foo v0.5.0 ({})
 {} target[..]release[..]foo-[..]
 
 running 1 test
 test bench_hello ... ",
         COMPILING, p.url(), RUNNING))
-              .with_stderr("\
+              .with_stderr_contains("\
 thread '<main>' panicked at 'assertion failed: \
     `(left == right)` (left: \
     `\"hello\"`, right: `\"nope\"`)', src[..]foo.rs:14